﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

using MvcApplication1.Models;

namespace MvcApplication1.Controllers
{
    public class EventsController : ApiController
    {
        public IEnumerable<EventModel> GetAllEvents()
        {
            return new List<EventModel> 
            {
                new EventModel() { Id = "1", Name = "Poker", geoLocationX = "36.841234", geoLocationY = "-75.979892" }
            };
        }

        public EventModel GetEventById(int id)
        {
            /*
            if (id < 1 || id > 4)
            {
                throw new HttpResponseException(System.Net.HttpStatusCode.NotFound);                
            }*/
            return new EventModel() { Id = id.ToString(), Name = id.ToString(), geoLocationX = id.ToString() };
        }
    }
}
